package com.mbti.youmore.service;

import com.mbti.youmore.entity.Follow;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
* @author Guqier
* @description 针对表【t_follow】的数据库操作Service
* @createDate 2024-05-08 20:30:45
*/
public interface FollowService extends IService<Follow> {

    List<Map<String, Object>> getFansInfo(Integer userId);

    List<Map<String, Object>> getFollowedUser(Integer userId);

    @Transactional
    boolean follow(Integer currentUserId, Integer targetUserId);

    @Transactional
    boolean cancelFollow(Integer currentUserId, Integer targetUserId);

    boolean isFollowEach(Integer currentUserId, Integer targetUserId);
}
